import { createNameComponent } from "../createNode";
const route = [
  {
    path: '/',
    redirect: '/main'
  },
  {
    path: "/main",
    component: createNameComponent(() => import("@/views/main/index.vue")),
    meta: {
      title: "message.menu.main.index"
    }
  },
  {
    path: "/login",
    component: createNameComponent(() => import("@/views/login/index.vue")),
    meta: { title: "message.system.login" }
  },
  {
    path: "/404",
    component: createNameComponent(() => import("@/views/404.vue")),
    meta: { title: "message.menu.system.404" }
  },
  {
    path: "/401",
    component: createNameComponent(() => import("@/views/401.vue")),
    meta: { title: "message.menu.system.401"  }
  },
  {
    path: "/redirect/:path(.*)",
    component: createNameComponent(() => import("@/views/redirect.vue")),
    meta: {
      title: "message.menu.system.redirect"
    }
  }
  // {
  //   // 找不到路由重定向到404页面
  //   path: "/:pathMatch(.*)",
  //   redirect: "/404",
  //   hideMenu: true,
  //   meta: { title: "" },
  // },
];

export default route;
